package smartcounters.androidclient;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class UsersActivity extends Activity implements OnClickListener{
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.users_layout);
        
        Button createButton = (Button)findViewById(R.id.buttonCreateUser);
        createButton.setOnClickListener(this);
        
        Button findButton = (Button)findViewById(R.id.buttonFindUser);
        findButton.setOnClickListener(this);
    }

	public void onClick(View arg0) {
		int id = arg0.getId(); 
		if (id == R.id.buttonCreateUser){
			Intent intent = new Intent();
			intent.setClass(this, CreateUserActivity.class);
			startActivity(intent);
		}
		else if (id == R.id.buttonFindUser){
			Intent intent = new Intent();
			intent.setClass(this, FindUserActivity.class);
			startActivity(intent);
		}
	}
}
